package sk.marek.barak.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Atributes implements Serializable, GetTimeAndItems{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3693125315135764916L;
	
	private int fcCount;
	private int fcTime;
	private int pidCount;
	private int pidTime;
	private int svpCount;
	private int svpTime;
	private int convCount;
	private int convTime;
	
	public Atributes(){
		fcCount = 0;
		fcTime = 0;
		pidCount = 0;
		pidTime = 0;
		svpCount = 0;
		svpTime = 0;
		
	};
	
	public int getFcCount() {
		return fcCount;
	}
	public void setFcCount(int fcCount) {
		this.fcCount = fcCount;
	}
	public int getFcTime() {
		return fcTime;
	}
	public void setFcTime(int fcTime) {
		this.fcTime = fcTime;
	}
	public int getPidCount() {
		return pidCount;
	}
	public void setPidCount(int pidCount) {
		this.pidCount = pidCount;
	}
	public int getPidTime() {
		return pidTime;
	}
	public void setPidTime(int pidTime) {
		this.pidTime = pidTime;
	}
	public int getSvpCount() {
		return svpCount;
	}
	public void setSvpCount(int svpCount) {
		this.svpCount = svpCount;
	}
	public int getSvpTime() {
		return svpTime;
	}
	public void setSvpTime(int svpTime) {
		this.svpTime = svpTime;
	}
	public int getConvCount() {
		return convCount;
	}
	public void setConvCount(int convCount) {
		this.convCount = convCount;
	}
	public int getConvTime() {
		return convTime;
	}
	public void setConvTime(int convTime) {
		this.convTime = convTime;
	}
	@Override
	public String toString() {
		return 	"FC Count=" + fcCount + ", FC Time=" + fcTime + "\n"+
				"PID Count=" + pidCount + ", PID Time=" + pidTime + "\n"+
				"SVP Count=" + svpCount + ", SVP Time=" + svpTime + "\n"+ 
				"CONV Count=" + convCount + ",CONV Time=" + convTime;
	}

	@Override
	public int getTotalTime() {
		return convCount * convTime + fcCount * fcTime + pidTime+pidCount + svpCount * svpTime;
	}

	@Override
	public List<String> getItems() {
		List<String> items = new ArrayList<String>();
		items.add("FC");
		items.add("PID");
		items.add("SVP");
		items.add("CONV");
		return items;
	}

	@Override
	public List<Integer> getAmount() {
		List<Integer> amounth = new ArrayList<Integer>();
		amounth.add(fcCount);
		amounth.add(pidCount);
		amounth.add(svpCount);
		amounth.add(convCount);
		return amounth;
	}

	@Override
	public List<Integer> getTimes() {
		List<Integer> times = new ArrayList<Integer>();
		times.add(fcTime);
		times.add(pidTime);
		times.add(svpTime);
		times.add(convTime);
		return times;
	}
	
}
